<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>for语句循环</title>
<script language="javascript">
var str="8";
for(i=0;i<4;i++){
	str="0"+str;
}
document.write(str+" ");
</script>
</head>
<body>

</body>
</html>